// 所有和【机构管理】相关的请求

import { httpDelete, httpGet, httpPost, httpPut } from "@/utils/http"

export type OrganizationsType = {
    _id?: string,
    image?: string,
    name: string,
    contacts: string,
    phone: number | string,
    address: string,
    intro: string,
    state: number,
}


// 查询机构管理数据
export const findOrganizationsApi = (data?: object) => {
    return httpPost('/organizations/search', data)
}
// 新增机构管理数据
export const addOrganizationApi = (data?: object) => {
    return httpPost('/organizations/add', data)
}
// 删除机构管理数据
export const deleteOrganizationApi = (data?: object) => {
    return httpDelete('/organizations/remove', data)
}
// 修改机构管理数据
export const updateOrganizationApi = (data?: object) => {
    return httpPut('/organizations/update', data)
}
//获取一个机构详情 /organizations/detail
export const detailOrganizationApi = (data?: object) => {
    return httpGet('/organizations/detail', data)
}